Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue with query string parsing #111

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

klowe0100
Copy link

This issue was leading to incorrect message digests which led to a 403
forbidden error.

The query parameter 'fields' needed to be decoded before use. Otherwise,
it would be encoded twice somewhere inside the request.META.get
(i think -unconfirmed)

i.e
,(comma) -> %2C -> %252C

This extra encoding caused the message digests to mismatch leading to
the 403 error.

Willing to write test coverage and help implement an alternative fix approach if requested.
Django 4.0.3
Python 3.8
Wagtail 2.16.1

This issue was leading to incorrect message digests which led to a 403
forbidden error.

The query parameter 'fields' needed to be decoded before use. Otherwise,
it would be encoded twice somewhere inside the request.META.get
(i think -unconfirmed)

i.e
,(comma) -> %2C -> %252C

This extra encoding caused the message digests to mismatch leading to
the 403 error.
Copy link
Member

@jacobtoppm jacobtoppm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing! I'm open to this, but I think it does need some test coverage - I haven't encountered this problem so far in testing, so we need to check this doesn't regress in future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants